package cn.qfei.qiyuesuo.service;

import cn.qfei.qiyuesuo.bo.*;
import cn.qfei.qiyuesuo.common.ContractConstant;
import cn.qfei.qiyuesuo.common.enums.ErrorCode;
import cn.qfei.qiyuesuo.vo.ExternalDataVo;
import cn.qfei.qiyuesuo.vo.qiyuesuo.QysContractNoticeVo;
import cn.qfei.qiyuesuo.vo.qiyuesuo.SingOptionRes;
import com.alibaba.fastjson2.JSONObject;
import org.apache.commons.lang3.StringUtils;

import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import java.util.Map;

public interface FeishuNoticeService {
    public FeishuNoticeBo getFeishuNoticeDTO(HttpServletRequest request) ;


    /**
     * 处理合同事件
     * @param feishuNoticeDTO
     * @return
     */
    public ErrorCode updateFeishuNotice(FeishuNoticeBo feishuNoticeDTO);


    public void getContractNodeNameFeishuInstance(String contractId,ContractNotceBo bo,String contractNodeName) ;


    String uploadContractFile(FilePathBo filePathBo);

    int updateContract(String contractId, List<String> attachmentIds);

    int updateInstanceAssignee(String processInstanceId, String taskInstanceId, String assigneeIds);

    ApprovalExampleBo getApprovalExample(String instanceId);

    int tasksApprov(FilePathBo filePathBo, TaskBo taskBo, ApprovalExampleBo bo);
    public ErrorCode updateContractPlace(QysContractNoticeVo vo, ContractNotceBo bo, List<TaskInstanceBo> taskInstanceList) ;
    public ErrorCode updateSpPlace(FeishuSpBo vo) ;

    FeishuSpBo getFeishuNoticeSpDTO(HttpServletRequest request);

    public ErrorCode sendMsgToContractCreateUser(String msg, String createUserId,String receiveType) ;
    public ErrorCode updateQysNotice(QysContractNoticeVo feishuNoticeDTO) ;


    SingOptionRes getSingOption(ExternalDataVo vo);
}
